package com.hzhc.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzhc.entity.ChargeContractFile;
import com.hzhc.mapper.ChargeContractFileMapper;
import com.hzhc.service.ChargeContractFileService;
import com.hzhc.utils.ResultUtil;
import lombok.RequiredArgsConstructor;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 计费合同附件 服务实现类
 * </p>
 *
 * @author 1
 * @since 2024-05-28
 */
@Service
@RequiredArgsConstructor
public class ChargeContractFileServiceImpl extends ServiceImpl<ChargeContractFileMapper, ChargeContractFile> implements ChargeContractFileService {

    @Override
    public ResultUtil<T> delContractById(Long id) {
        ChargeContractFile file = getById(id);
        file.setDisable(1);
        if (updateById(file)){
            return ResultUtil.ok();
        }
        return ResultUtil.fail();
    }
}
